{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Random sample imputation\n",
    "\n",
    "Imputation is the act of replacing missing data with statistical estimates of the missing values. The goal of any imputation technique is to produce a **complete dataset** that can then be then used for machine learning.\n",
    "\n",
    "Random sampling imputation is in principle similar to mean/median imputation, in the sense that it aims to preserve the statistical parameters of the original variable, for which data is missing.\n",
    "\n",
    "Random sampling consist of taking a random observation from the pool of available observations of the variable, and using that randomly extracted value to fill the NA. In Random Sampling one takes as many random observations as missing values are present in the variable.\n",
    "\n",
    "By random sampling observations of the variable for those instances where data is available, we guarantee that the mean and standard deviation of the variable are preserved.\n",
    "\n",
    "\n",
    "### Assumptions\n",
    "\n",
    "Random sample imputation assumes that the data are missing completely at random (MCAR). If this is the case, it makes sense to substitute the missing values, by values extracted from the original variable distribution. \n",
    "\n",
    "From a probabilistic  point of view, values that are more frequent (like the mean or the median) will be selected more often (because there are more of them to select from), but other less frequent values will be selected as well. Thus, the variance of the variable is preserved. \n",
    "\n",
    "The rationale is to replace the population of missing values with a population of values with the same distribution of the variable.\n",
    "\n",
    "\n",
    "### Advantages\n",
    "\n",
    "- Easy to implement\n",
    "- Fast way of obtaining complete datasets\n",
    "- Preserves the variance of the variable\n",
    "\n",
    "### Limitations\n",
    "\n",
    "- Randomness\n",
    "\n",
    "Randomness may not seem much of a concern when replacing missing values for data competitions, where the whole batch of missing values is replaced once and then the dataset is scored and that is the end of the problem. However, in business scenarios the situation is very different. \n",
    "\n",
    "Imagine for example the scenario of Mercedes-Benz, where they are trying to predict how long a certain car will be in the garage before it passes all the security tests. Today, they receive a car with missing data in some of the variables, they run the machine learning model to predict how long this car will stay in the garage, the model replaces missing values by a random sample of the variable and then produces an estimate of time. Tomorrow, when they run the same model on the same car, the model will randomly assign values to the missing data, that may or may not be the same as the ones it selected today, therefore, the final estimation of time in the garage, may or may not be the same as the one obtained the day before.\n",
    "\n",
    "In addition, imagine also that Mercedes-Benz evaluates 2 different cars that have exactly the same values for all of the variables, and missing values in exactly the same subset of variables. They run the machine learning model for each car, and because the missing data is randomly filled with values, the 2 cars, that are exactly the same, may end up with different estimates of time in the garage. \n",
    "\n",
    "This may sound completely trivial and unimportant, however, businesses must follow a variety of regulations, and some of them require that the same treatment be provided to the same situation. So if instead of cars, these were people applying for a loan, or people seeking some disease treatment, the machine learning model would end up providing different solutions to candidates that are otherwise in the same conditions. And this is not fair or acceptable.\n",
    "\n",
    "It is still possible to replace missing data by random sample, but these randomness needs to be controlled, so that individuals in the same situation end up with the same scores and therefore solutions.\n",
    "\n",
    "Finally, another potential limitation of random sampling, similarly to replacing with the mean and median, is that estimates of covariance and correlations with other variables in the dataset may also be washed off by the randomness.\n",
    "\n",
    "### Final note\n",
    "\n",
    "Replacement of missing values by random sample, although similar in concept to replacement by the median or mean, is not as widely used in the data science community as the mean/median imputation, presumably because of the element of randomness.\n",
    "\n",
    "However, it is a valid approach, with advantages over mean/median imputation as it preserves the distribution of the variable. And if you are mindful of the element of randomness and account for it somehow, this may as well be your method of choice."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "===============================================================================\n",
    "\n",
    "## Real Life example: \n",
    "\n",
    "### Predicting Survival on the Titanic: understanding society behaviour and beliefs\n",
    "\n",
    "Perhaps one of the most infamous shipwrecks in history, the Titanic sank after colliding with an iceberg, killing 1502 out of 2224 people on board. Interestingly, by analysing the probability of survival based on few attributes like gender, age, and social status, we can make very accurate predictions on which passengers would survive. Some groups of people were more likely to survive than others, such as women, children, and the upper-class. Therefore, we can learn about the society priorities and privileges at the time.\n",
    "\n",
    "=============================================================================\n",
    "\n",
    "In the following cells, I will show random sampling imputation on the Titanic dataset from Kaggle.\n",
    "\n",
    "If you haven't downloaded the datasets yet, in the lecture \"Guide to setting up your computer\" in section 1, you can find the details on how to do so."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "% matplotlib inline\n",
    "\n",
    "# for classification\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.ensemble import RandomForestClassifier\n",
    "from sklearn.svm import SVC\n",
    "\n",
    "# to split and standarise the datasets\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "\n",
    "# to evaluate classification models\n",
    "from sklearn.metrics import roc_auc_score\n",
    "\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Survived</th>\n",
       "      <th>Age</th>\n",
       "      <th>Fare</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>7.2500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>38.0</td>\n",
       "      <td>71.2833</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>26.0</td>\n",
       "      <td>7.9250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>35.0</td>\n",
       "      <td>53.1000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>35.0</td>\n",
       "      <td>8.0500</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Survived   Age     Fare\n",
       "0         0  22.0   7.2500\n",
       "1         1  38.0  71.2833\n",
       "2         1  26.0   7.9250\n",
       "3         1  35.0  53.1000\n",
       "4         0  35.0   8.0500"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# load the Titanic Dataset with a few variables for demonstration\n",
    "\n",
    "data = pd.read_csv('titanic.csv', usecols = ['Age', 'Fare', 'Survived'])\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Survived    0.000000\n",
       "Age         0.198653\n",
       "Fare        0.000000\n",
       "dtype: float64"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's look at the percentage of NA\n",
    "\n",
    "data.isnull().mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Imputation important\n",
    "\n",
    "Imputation should done over the training set, and then propagated to the test set. This means that the random sample to be used to fill missing values both in train and test set, should be extracted from the train set."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((623, 3), (268, 3))"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's separate into training and testing set\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(data, data.Survived, test_size=0.3,\n",
    "                                                    random_state=0)\n",
    "X_train.shape, X_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# let's make a function to create 3 variables from Age:\n",
    "# 1-e filling NA with median, 2- random sampling or 3- zeroes\n",
    "\n",
    "def impute_na(df, variable, median):\n",
    "    df[variable+'_median'] = df[variable].fillna(median)\n",
    "    df[variable+'_zero'] = df[variable].fillna(0)\n",
    "    \n",
    "    # random sampling\n",
    "    df[variable+'_random'] = df[variable]\n",
    "    # extract the random sample to fill the na\n",
    "    random_sample = X_train[variable].dropna().sample(df[variable].isnull().sum(), random_state=0)\n",
    "    # pandas needs to have the same index in order to merge datasets\n",
    "    random_sample.index = df[df[variable].isnull()].index\n",
    "    df.loc[df[variable].isnull(), variable+'_random'] = random_sample"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "29.915338645418327"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "median = X_train.Age.mean()\n",
    "median"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Survived</th>\n",
       "      <th>Age</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Age_median</th>\n",
       "      <th>Age_zero</th>\n",
       "      <th>Age_random</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>857</th>\n",
       "      <td>1</td>\n",
       "      <td>51.0</td>\n",
       "      <td>26.5500</td>\n",
       "      <td>51.000000</td>\n",
       "      <td>51.0</td>\n",
       "      <td>51.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>1</td>\n",
       "      <td>49.0</td>\n",
       "      <td>76.7292</td>\n",
       "      <td>49.000000</td>\n",
       "      <td>49.0</td>\n",
       "      <td>49.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>386</th>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>46.9000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>124</th>\n",
       "      <td>0</td>\n",
       "      <td>54.0</td>\n",
       "      <td>77.2875</td>\n",
       "      <td>54.000000</td>\n",
       "      <td>54.0</td>\n",
       "      <td>54.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>578</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>14.4583</td>\n",
       "      <td>29.915339</td>\n",
       "      <td>0.0</td>\n",
       "      <td>16.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>549</th>\n",
       "      <td>1</td>\n",
       "      <td>8.0</td>\n",
       "      <td>36.7500</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>8.0</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118</th>\n",
       "      <td>0</td>\n",
       "      <td>24.0</td>\n",
       "      <td>247.5208</td>\n",
       "      <td>24.000000</td>\n",
       "      <td>24.0</td>\n",
       "      <td>24.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>20.000000</td>\n",
       "      <td>20.0</td>\n",
       "      <td>20.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>157</th>\n",
       "      <td>0</td>\n",
       "      <td>30.0</td>\n",
       "      <td>8.0500</td>\n",
       "      <td>30.000000</td>\n",
       "      <td>30.0</td>\n",
       "      <td>30.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>127</th>\n",
       "      <td>1</td>\n",
       "      <td>24.0</td>\n",
       "      <td>7.1417</td>\n",
       "      <td>24.000000</td>\n",
       "      <td>24.0</td>\n",
       "      <td>24.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>653</th>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.8292</td>\n",
       "      <td>29.915339</td>\n",
       "      <td>0.0</td>\n",
       "      <td>32.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>235</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.5500</td>\n",
       "      <td>29.915339</td>\n",
       "      <td>0.0</td>\n",
       "      <td>34.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>785</th>\n",
       "      <td>0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>7.2500</td>\n",
       "      <td>25.000000</td>\n",
       "      <td>25.0</td>\n",
       "      <td>25.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>241</th>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>15.5000</td>\n",
       "      <td>29.915339</td>\n",
       "      <td>0.0</td>\n",
       "      <td>8.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>351</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>35.0000</td>\n",
       "      <td>29.915339</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>862</th>\n",
       "      <td>1</td>\n",
       "      <td>48.0</td>\n",
       "      <td>25.9292</td>\n",
       "      <td>48.000000</td>\n",
       "      <td>48.0</td>\n",
       "      <td>48.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>851</th>\n",
       "      <td>0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>7.7750</td>\n",
       "      <td>74.000000</td>\n",
       "      <td>74.0</td>\n",
       "      <td>74.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>753</th>\n",
       "      <td>0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>7.8958</td>\n",
       "      <td>23.000000</td>\n",
       "      <td>23.0</td>\n",
       "      <td>23.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>532</th>\n",
       "      <td>0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>7.2292</td>\n",
       "      <td>17.000000</td>\n",
       "      <td>17.0</td>\n",
       "      <td>17.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>485</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>25.4667</td>\n",
       "      <td>29.915339</td>\n",
       "      <td>0.0</td>\n",
       "      <td>34.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Survived   Age      Fare  Age_median  Age_zero  Age_random\n",
       "857         1  51.0   26.5500   51.000000      51.0        51.0\n",
       "52          1  49.0   76.7292   49.000000      49.0        49.0\n",
       "386         0   1.0   46.9000    1.000000       1.0         1.0\n",
       "124         0  54.0   77.2875   54.000000      54.0        54.0\n",
       "578         0   NaN   14.4583   29.915339       0.0        16.0\n",
       "549         1   8.0   36.7500    8.000000       8.0         8.0\n",
       "118         0  24.0  247.5208   24.000000      24.0        24.0\n",
       "12          0  20.0    8.0500   20.000000      20.0        20.0\n",
       "157         0  30.0    8.0500   30.000000      30.0        30.0\n",
       "127         1  24.0    7.1417   24.000000      24.0        24.0\n",
       "653         1   NaN    7.8292   29.915339       0.0        32.0\n",
       "235         0   NaN    7.5500   29.915339       0.0        34.0\n",
       "785         0  25.0    7.2500   25.000000      25.0        25.0\n",
       "241         1   NaN   15.5000   29.915339       0.0         8.0\n",
       "351         0   NaN   35.0000   29.915339       0.0         1.0\n",
       "862         1  48.0   25.9292   48.000000      48.0        48.0\n",
       "851         0  74.0    7.7750   74.000000      74.0        74.0\n",
       "753         0  23.0    7.8958   23.000000      23.0        23.0\n",
       "532         0  17.0    7.2292   17.000000      17.0        17.0\n",
       "485         0   NaN   25.4667   29.915339       0.0        34.0"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "impute_na(X_train, 'Age', median)\n",
    "X_train.head(20)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "impute_na(X_test, 'Age', median)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Random sampling preserves the original distribution of the variable"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x58592a7f98>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAD8CAYAAABdCyJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8VGX6///XlU4nJCEEAiRA6J1QFFTsoCL6sYANUb+L\nfEHUdde1bcH9uj/d5q7uB3VxZUVksSAKrigqyApIC70GIjUQSAgQQgkpc/3+mIEdY0ghmZyZyfV8\nPMbMnHOfOe+RJFfOfc65b1FVjDHGmIsV4nQAY4wxgc0KiTHGmGqxQmKMMaZarJAYY4ypFiskxhhj\nqsUKiTHGmGqxQmKMMaZarJAYY4ypFiskxhhjqiXM6QC1ITY2VpOSkpyOYYwxAWXNmjVHVDWuonZ1\nopAkJSWRlpbmdAxjjAkoIrK3Mu2sa8sYY0y1WCExxhhTLVZIjDHGVEudOEdijPFPRUVFZGZmUlBQ\n4HSUOi0qKorExETCw8MvansrJMYYx2RmZtKoUSOSkpIQEafj1EmqSm5uLpmZmSQnJ1/Ue/i0a0tE\nholIuohkiMjTZawXEXnVs36jiPT1LI8SkVUiskFEtojI817bNBOR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tA\nVQtV9bjTubyEAfVEJAyoDxx0IpuqfgscLbX4Qjlq9WeyrGy1/fvCCkkpIjISOKCqG0qtagXs93qd\n6VnmhAeBzz3Pnc7l9P4vSESSgD7ASiDeM/smwCEg3oFIf8X9B4rLa5nTuZKBHOCfni63f4hIAz/I\nhaoeAP6Eu2cgC/cMql/6QzaPC+Xwt58Jn/++8OWc7X5LRL4GWpSx6jngWdzdWrWuvFyqOtfT5jnc\n3TczazNboBGRhsBHwOOqekJEzq9TVRWRWr1cUURuArJVdY2IDC2rjRO5cP8O6AtMUtWVIvIKpbqK\nHMqF55zDSNzF7jjwoYjc6w/ZSvOXHKXV1u+LOllIVPWaspaLSA/c37QbPL94EoG1IjIAOAC09mqe\n6Fnm81xe+cYCNwFX63+v2/Z5rgo4vf8fEZFw3EVkpqrO8Sw+LCIJqpolIglAdi3HGgzcLCI3AFFA\nYxF51w9yZQKZqrrS83o27kLidC6Aa4DdqpoDICJzgEv9JBvl5PCLn4na/H1hXVteVHWTqjZX1SRV\nTcL9Q9ZXVQ8B84DRIhIpIslACrCqtrKJyDDc3SI3q+ppr1WO5gJWAykikiwiEbhP5M2rxf3/gLj/\nAngL2KaqL3utmgfc73l+PzC3NnOp6jOqmuj5vhoNLFLVe/0g1yFgv4h08iy6GtjqdC6PfcAgEanv\n+Xe9Gvc5L3/IRjk5nP6ZrP3fF6pqjws8gD1ArNfr54DvgXRgeC1nycDdt7ne83jDH3J59n8D7itD\nvsfdDefkv9kQ3BdJbPT6f3UDEIP7ypqdwNdAMwczDgX+7XnueC6gN5Dm+X/2CRDtD7k82Z4HtgOb\ngRlApBPZgFm4z9MU4f4D86HyctTmz+QFstXq7wu7s90YY0y1WNeWMcaYarFCYowxplqskBhjjKkW\nKyTGGGOqxQqJMcaYarFCYowxplqskBhjjKkWKyTGGGOq5f8H7chhPCbCqFUAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x5858e5f128>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# we can see that the distribution of the variable after filling NA is exactly the same as that one before filling NA\n",
    "fig = plt.figure()\n",
    "ax = fig.add_subplot(111)\n",
    "X_train['Age'].plot(kind='kde', ax=ax)\n",
    "X_train.Age_random.plot(kind='kde', ax=ax, color='red')\n",
    "lines, labels = ax.get_legend_handles_labels()\n",
    "ax.legend(lines, labels, loc='best')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see that replacing missing values with a random sample from the training set preserves the original distribution of the variable.\n",
    "\n",
    "Whereas replacing by the median only, or filling NA  with zeros, alters the distribution. See below."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x585935dfd0>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAD8CAYAAABkbJM/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd41eXZwPHvnQ0ZhJAEEsIImzCFACqgqEXBhXu0blul\n7lZ9tWqrVvtafa211lUVpahFBQeItFoc7Bl2wgqEkEAgEAgZJGQ97x/PCQQI5CTk5HeSc3+u61wn\n5/mNcyeQc+fZYoxBKaWUqouf0wEopZRqHjRhKKWUcosmDKWUUm7RhKGUUsotmjCUUkq5RROGUkop\nt2jCUEop5RZNGEoppdyiCUMppZRbApwOoDFFR0ebrl27Oh2GUko1GykpKfuMMTHunNuiEkbXrl1Z\nsWKF02EopVSzISKZ7p6rTVJKKaXcoglDKaWUWzRhKKWUckuL6sNQSnmv8vJysrOzKS0tdToUnxQS\nEkJCQgKBgYENvocmDKVUk8jOziY8PJyuXbsiIk6H41OMMeTl5ZGdnU1iYmKD76NNUkqpJlFaWkq7\ndu00WThARGjXrt1p1+40YSilmowmC+c0xs9eE4ZSNaWnw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AV2ASMdyCedGz742rX420viu1i\n7GiMrdjmM6f+zUZhByusrfFzuhhohx3FsgWYA0Q5GOMYYJbra6+ICxgMrHD93L4C2npDbMCzwEZg\nPfAhEOxUXMBUbF9KOfaPyTtPFUtT/U6eJK4m/6zQmd5KKaXc4nNNUkoppRpGE4ZSSim3aMJQSinl\nFk0YSiml3KIJQymllFs0YSillHKLJgyllFJu0YShlFLKLf8PEMtaVYwdTLoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x5858e5f8d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# we can see that the distribution has changed slightly with now more values accumulating in the median range\n",
    "fig = plt.figure()\n",
    "ax = fig.add_subplot(111)\n",
    "X_train['Age'].plot(kind='kde', ax=ax)\n",
    "X_train.Age_median.plot(kind='kde', ax=ax, color='red')\n",
    "lines, labels = ax.get_legend_handles_labels()\n",
    "ax.legend(lines, labels, loc='best')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Median imputation results in an increase in the number of observations with values around the median."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x5859414f98>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAD8CAYAAABdCyJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8lfXZ+PHPlc0IhEACIQkk7C0jIggKDqYDqQutq9pa\nt7X2qbY+tvXXxz5WW+solWrd9QGtC2xRVMSBzIARCDOMQCCBEEYIEEKS6/fHfQIhOUlOkrOSXO/X\n67zOOff9vc99HSW58t2iqhhjjDENFRLoAIwxxjRtlkiMMcY0iiUSY4wxjWKJxBhjTKNYIjHGGNMo\nlkiMMcY0iiUSY4w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HqKo96ngAO4BOld4/AmwFNgFT/BxLFk47Z4brMSsY4nLdfyrOKJGtOM1wgfr/NRZngMSa\nSv+dpgIdcUbXbAE+B2IDFN944N+u18ES01Ag3fXf7EOgQzDEBjwGbATWAW8CkYGIC5iN009zEucP\ny9tqi8NfP4s1xOX33xE2s90YY0yjWNOWMcaYRrFEYowxplEskRhjjGkUSyTGGGMaxRKJMcaYRrFE\nYowxplEskRhjjGkUSyTGGGMa5f8DGkd3aOS81wwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x5858e5fcc0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# filling NA with zeroes creates a peak of population around 0, as expected\n",
    "fig = plt.figure()\n",
    "ax = fig.add_subplot(111)\n",
    "X_train['Age'].plot(kind='kde', ax=ax)\n",
    "X_train.Age_zero.plot(kind='kde', ax=ax, color='red')\n",
    "lines, labels = ax.get_legend_handles_labels()\n",
    "ax.legend(lines, labels, loc='best')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Zero imputation results in an increase in the number of observations with values around the zero."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Logistic Regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train set zero imputation\n",
      "Logistic Regression roc-auc: 0.6863462831608859\n",
      "Test set zero imputation\n",
      "Logistic Regression roc-auc: 0.7137499999999999\n",
      "\n",
      "Train set median imputation\n",
      "Logistic Regression roc-auc: 0.6789494804884926\n",
      "Test set median imputation\n",
      "Logistic Regression roc-auc: 0.7252380952380951\n",
      "\n",
      "Train set random sample imputation\n",
      "Logistic Regression roc-auc: 0.6851369818442117\n",
      "Test set random sample imputation\n",
      "Logistic Regression roc-auc: 0.7121130952380953\n"
     ]
    }
   ],
   "source": [
    "# let's compare the performance of logistic regression on Age NA imputed by zeroes, or median or random sampling\n",
    "\n",
    "logit = LogisticRegression(random_state=44, C=1000) # c big to avoid regularization\n",
    "logit.fit(X_train[['Age_zero', 'Fare']], y_train)\n",
    "print('Train set zero imputation')\n",
    "pred = logit.predict_proba(X_train[['Age_zero', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set zero imputation')\n",
    "pred = logit.predict_proba(X_test[['Age_zero', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))\n",
    "print()\n",
    "logit = LogisticRegression(random_state=44, C=1000) # c big to avoid regularization\n",
    "logit.fit(X_train[['Age_median', 'Fare']], y_train)\n",
    "print('Train set median imputation')\n",
    "pred = logit.predict_proba(X_train[['Age_median', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set median imputation')\n",
    "pred = logit.predict_proba(X_test[['Age_median', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))\n",
    "print()\n",
    "logit = LogisticRegression(random_state=44, C=1000) # c big to avoid regularization\n",
    "logit.fit(X_train[['Age_random', 'Fare']], y_train)\n",
    "print('Train set random sample imputation')\n",
    "pred = logit.predict_proba(X_train[['Age_random', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set random sample imputation')\n",
    "pred = logit.predict_proba(X_test[['Age_random', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see that replacing the NA with a random sample of the dataset, does not perform as well as when replacing with the median. However, this is entirely due to randomness. I invite you to change the seed (random_sate) in the impute_na function, then recreate the X_train and X_test, and you will see how the performance of logistic regression varies. In some cases, the performance will be better.\n",
    "\n",
    "So if the performance of median imputation vs random sample imputation are similar, which method should I use?\n",
    "\n",
    "Choosing which imputation method to use, will depend on various things:\n",
    "- are NA missing completely at random?\n",
    "- do you want to preserve the distribution of the variable?\n",
    "- are you willing to accept an element of randomness in your imputation method?\n",
    "- are you aiming to win a data competition? or to make business driven decisions?\n",
    "\n",
    "There is no 'correct' answer to which imputation method you can use, it rather depends on what you are trying to achieve.\n",
    "\n",
    "\n",
    "### Support Vector Machine"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train set zero imputation\n",
      "Logistic Regression roc-auc: 0.687935185787727\n",
      "Test set zero imputation\n",
      "Logistic Regression roc-auc: 0.7243452380952381\n",
      "\n",
      "Train set median imputation\n",
      "Logistic Regression roc-auc: 0.6932984100127979\n",
      "Test set median imputation\n",
      "Logistic Regression roc-auc: 0.7417261904761905\n",
      "\n",
      "Train set random imputation\n",
      "Logistic Regression roc-auc: 0.6993991453547644\n",
      "Test set random imputation\n",
      "Logistic Regression roc-auc: 0.7396130952380952\n"
     ]
    }
   ],
   "source": [
    "# let's compare the performance of SVMs on Age NA imputed by zeroes, or median or random sampling\n",
    "\n",
    "SVM_model = SVC(random_state=44, probability=True, max_iter=-1, kernel='linear',)\n",
    "SVM_model.fit(X_train[['Age_zero', 'Fare']], y_train)\n",
    "print('Train set zero imputation')\n",
    "pred = SVM_model.predict_proba(X_train[['Age_zero', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set zero imputation')\n",
    "pred = SVM_model.predict_proba(X_test[['Age_zero', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))\n",
    "print()\n",
    "SVM_model = SVC(random_state=44, probability=True,  max_iter=-1, kernel='linear')\n",
    "SVM_model.fit(X_train[['Age_median', 'Fare']], y_train)\n",
    "print('Train set median imputation')\n",
    "pred = SVM_model.predict_proba(X_train[['Age_median', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set median imputation')\n",
    "pred = SVM_model.predict_proba(X_test[['Age_median', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))\n",
    "print()\n",
    "SVM_model = SVC(random_state=44, probability=True, max_iter=-1, kernel='linear')\n",
    "SVM_model.fit(X_train[['Age_random', 'Fare']], y_train)\n",
    "print('Train set random imputation')\n",
    "pred = SVM_model.predict_proba(X_train[['Age_random', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set random imputation')\n",
    "pred = SVM_model.predict_proba(X_test[['Age_random', 'Fare']])\n",
    "print('Logistic Regression roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For SVM as well, median imputation or random sample imputation work better than replacing NA with zeroes. But keep in mind that because random sample is precisely, random, if you had randomly selected a different bunch of values to replace the NA in Age, the last SVM roc-auc, might have been different.\n",
    "\n",
    "Why median imputation works better than zero imputation was discussed in the previous lecture \"Replacing NA by mean or median\". I invite you to go back to that notebook and have a look if you haven't.\n",
    "\n",
    "### Random Forests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train set zero imputation\n",
      "Random Forests roc-auc: 0.7555855621353116\n",
      "Test set zero imputation\n",
      "Random Forests zero imputation roc-auc: 0.7490476190476191\n",
      "\n",
      "Train set median imputation\n",
      "Random Forests roc-auc: 0.7516485542612958\n",
      "Test set median imputation\n",
      "Random Forests roc-auc: 0.7698809523809524\n",
      "\n",
      "Train set random imputation\n",
      "Random Forests roc-auc: 0.7542027287911326\n",
      "Test set random imputation\n",
      "Random Forests roc-auc: 0.7543749999999999\n"
     ]
    }
   ],
   "source": [
    "# let's compare the performance of Random Forests on Age NA imputed by zeroes, or median or random sampling\n",
    "\n",
    "rf = RandomForestClassifier(n_estimators=100, random_state=39, max_depth=3)\n",
    "rf.fit(X_train[['Age_zero', 'Fare']], y_train)\n",
    "print('Train set zero imputation')\n",
    "pred = rf.predict_proba(X_train[['Age_zero', 'Fare']])\n",
    "print('Random Forests roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set zero imputation')\n",
    "pred = rf.predict_proba(X_test[['Age_zero', 'Fare']])\n",
    "print('Random Forests zero imputation roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))\n",
    "print()\n",
    "rf = RandomForestClassifier(n_estimators=100, random_state=39, max_depth=3)\n",
    "rf.fit(X_train[['Age_median', 'Fare']], y_train)\n",
    "print('Train set median imputation')\n",
    "pred = rf.predict_proba(X_train[['Age_median', 'Fare']])\n",
    "print('Random Forests roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set median imputation')\n",
    "pred = rf.predict_proba(X_test[['Age_median', 'Fare']])\n",
    "print('Random Forests roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))\n",
    "print()\n",
    "rf = RandomForestClassifier(n_estimators=100, random_state=39, max_depth=3)\n",
    "rf.fit(X_train[['Age_random', 'Fare']], y_train)\n",
    "print('Train set random imputation')\n",
    "pred = rf.predict_proba(X_train[['Age_random', 'Fare']])\n",
    "print('Random Forests roc-auc: {}'.format(roc_auc_score(y_train, pred[:,1])))\n",
    "print('Test set random imputation')\n",
    "pred = rf.predict_proba(X_test[['Age_random', 'Fare']])\n",
    "print('Random Forests roc-auc: {}'.format(roc_auc_score(y_test, pred[:,1])))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Random Forests, as well as SVMs, perform better with median and random sampling imputation, compared with replacing with zeroes. The caveat of randomness still applies.\n",
    "\n",
    "### Randomness can lead to different scores being assigned to the same observation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Survived</th>\n",
       "      <th>Age</th>\n",
       "      <th>Fare</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8.4583</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Survived  Age    Fare\n",
       "5         0  NaN  8.4583"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's pick one observation with NA in Age\n",
    "observation = data[data.Age.isnull()].head(1)\n",
    "observation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Survived</th>\n",
       "      <th>Age</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Age_random</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8.4583</td>\n",
       "      <td>29.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Survived  Age    Fare  Age_random\n",
       "5         0  NaN  8.4583        29.0"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# and now let's fill that NA with a random value extracted from the same variable where observations are available\n",
    "\n",
    "obs_sample = X_train.Age.dropna().sample(1)\n",
    "obs_sample.index = [5] #pandas needs the same index to be able to merge\n",
    "observation['Age_random']=obs_sample\n",
    "observation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0.47689249])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# and now let's make a prediction with random forest\n",
    "\n",
    "rf.predict_proba(observation[['Fare', 'Age_random']])[:,1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0.5488158])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's repeat the exercise again: we fill the NA with another random extracted value, and make a new prediction\n",
    "obs_sample = X_train.Age.dropna().sample(1)\n",
    "obs_sample.index = [5]\n",
    "observation['Age_random']=obs_sample\n",
    "rf.predict_proba(observation[['Fare', 'Age_random']])[:,1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 0.47734871])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# and again\n",
    "obs_sample = X_train.Age.dropna().sample(1)\n",
    "obs_sample.index = [5]\n",
    "observation['Age_random']=obs_sample\n",
    "rf.predict_proba(observation[['Fare', 'Age_random']])[:,1]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see that every time we repeat the operation, we get a different score, for exactly the same observation. In fact, if we repeat the process 100 times:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x585945e5f8>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADe9JREFUeJzt3W+MHHd9x/HPpzg88UYmyLBY17QHaoRk4jattykqqNoT\ntEqTB0nUiBJVaVCojlYl4kEe1OIBRYqQ/KCCPuk/S4mSB4VTJeIS2S7IDSwWKkK9i9zYIUGh6QE5\nuVgWwc1GlVqXbx/cmFyvezszO/vvvvd+SavbmfnNzve+nv1oPDs754gQAGD3+5lZFwAAGA8CHQCS\nINABIAkCHQCSINABIAkCHQCSINABIAkCHQCSINABIIl909zYwYMHY3FxsfZ6r7/+uvbv3z/+ghKh\nR8PRn3L0aLhZ9mdtbe1KRLytbNxUA31xcVGrq6u11+v1eup2u+MvKBF6NBz9KUePhptlf2x/r8o4\nTrkAQBIEOgAkQaADQBIEOgAkQaADQBIEOgAkQaADQBIEOgAkQaADQBJT/aYogP9v8djpgfPXj981\n5Uqw23GEDgBJEOgAkASBDgBJEOgAkASBDgBJEOgAkASBDgBJEOgAkASBDgBJEOgAkERpoNu+2fbX\nbH/b9vO2P1HM/7TtDdvni8edky8XALCTKvdyuSbpkYh41vaNktZsny2WfS4i/mxy5QEAqioN9Ii4\nJOlS8fw12y9IWph0YQCAemqdQ7e9KOmXJX2rmPWw7edsP277pjHXBgCowRFRbaDdkvR1SZ+JiKds\ntyVdkRSSHpV0KCIeGrDesqRlSWq320dXV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Z0oclPT2esgAAdY18hB4R12x/XNJX\nJL1J0uMR8fzYKgMA1NLoXi4RcUbSmTHVMkyjUzZ7BD0ajv6Uo0fDzX1/Rv5QFAAwX/jqPwAkMfNA\nL7t9gO27bT9n+7ztVdvv37Js3faF68umW/l0VL29gu1ftX2tuJy01rq7XcMe7fl9yHbX9tWiB+dt\nf6rqulk07NH87EMRMbOHNj9M/VdJ75L0Zkn/IunwtjEtvXFq6Bclvbhl2bqkg7P8HWbdny3jvqrN\nzzPuq7Pubn806RH70E/HdCWdGrW3u/3RpEfztg/N+gi99PYBEdGPomuS9kvaSyf9q95e4WFJX5R0\neYR1d7smPdoLmuwH7EO7zKwDvdLtA2zfa/tFSaclPbRlUUj6R9trxTdSsyntj+0FSfdK+qu66ybR\npEcS+9B1v16c2vwH2++pue5u16RH0hztQ7viT9BFxElJJ23/hqRHJX2wWPT+iNiw/XZJZ22/GBHn\nZlbobPy5pD+JiJ/YnnUt82pYj9iHpGcl/VxE9G3fKenvJd0y45rmzbAezc0+NOsj9Eq3D7iuaNK7\nbB8spjeKn5clndTmf50yqdKfjqQV2+uS7pP0l7bvqbhuBk16xD4kKSL+IyL6xfMzkm4o3mPsQ4Uh\nPZqvfWjGH0bsk/SypHfqjQ8j3rNtzC/ojQ9Ff0WbjbY2z6ffWMzfL+mftHmzsJl/MDHN/mwb/4Te\n+FC01rq79dGwR+xDm2PeseU9druk7xfvMfah8h7N1T4001MuscPtA2z/YbH8ryX9jqTft/3fkv5T\n0u9GRNhua/M0jLT5D/L5iPjyTH6RCanYn1rrTqPuaWrSI0nsQ5v9uU/SH9m+ps332IdjM6HYhzS8\nR/OWQ3xTFACSmPU5dADAmBDoAJAEgQ4ASRDoAJAEgQ4ASRDoAJAEgQ4ASRDoAJDE/wISzPJiPKTr\nFAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x58594320f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# if we repeat the process 100 times\n",
    "predictions_ls = []\n",
    "for i in range(100):\n",
    "    obs_sample = X_train.Age.dropna().sample(1)\n",
    "    obs_sample.index = [5]\n",
    "    observation['Age_random']=obs_sample\n",
    "    predictions_ls.append(float(rf.predict_proba(observation[['Fare', 'Age_random']])[:,1]))\n",
    "    \n",
    "pd.Series(predictions_ls).hist(bins=50)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We obtain very different values for the same observation. If this were patients looking for treatment, we would assign patients with the same characteristics to different treatments, and this is not ok.\n",
    "\n",
    "### How can we fix this randomness?\n",
    "\n",
    "We can fix this randomness by assigning a seed:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "predictions_ls = []\n",
    "na_replacement = []\n",
    "for i in range(10):\n",
    "    obs_sample = X_train.Age.dropna().sample(1, random_state=39) # we set the random seed at the moment of sampling\n",
    "    obs_sample.index = [5]\n",
    "    na_replacement.append(float(obs_sample))\n",
    "    observation['Age_random']=obs_sample\n",
    "    predictions_ls.append(float(rf.predict_proba(observation[['Fare', 'Age_random']])[:,1]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[19.0, 19.0, 19.0, 19.0, 19.0, 19.0, 19.0, 19.0, 19.0, 19.0]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# now we get the same replacement every single time\n",
    "na_replacement"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0.5231257238817243,\n",
       " 0.5231257238817243,\n",
       " 0.5231257238817243,\n",
       " 0.5231257238817243,\n",
       " 0.5231257238817243,\n",
       " 0.5231257238817243,\n",
       " 0.5231257238817243,\n",
       " 0.5231257238817243,\n",
       " 0.5231257238817243,\n",
       " 0.5231257238817243]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# and therefore we make the same prediction every single time\n",
    "predictions_ls"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "However, if we set the same seed for every single observation, what would happen is that for every new observation, we would be filling the NA with exactly the same value. See below:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Survived</th>\n",
       "      <th>Age</th>\n",
       "      <th>Fare</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>888</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>23.45</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Survived  Age   Fare\n",
       "888         0  NaN  23.45"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's find a different observation where Age is null\n",
    "observation = data[data.Age.isnull()].tail(1)\n",
    "observation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Survived</th>\n",
       "      <th>Age</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Age_random</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>888</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>23.45</td>\n",
       "      <td>19.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Survived  Age   Fare  Age_random\n",
       "888         0  NaN  23.45        19.0"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's replace the NA using the same seed\n",
    "obs_sample = X_train.Age.dropna().sample(1, random_state=39)\n",
    "obs_sample.index = [888]\n",
    "observation['Age_random']=obs_sample\n",
    "observation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As you can see, we filled the NA with exactly the same value, 19, therefore, this is no longer a random sampling. The sample is indeed taken at random, but this randomness is dictated by the seed, and the seed is always the same, so we would have replaced the NA by exactly the same value, each time.\n",
    "\n",
    "How can we prevent this?\n",
    "\n",
    "### Controlling the element of randomness by varying the seed\n",
    "\n",
    "We can attribute a different seed to each observation, and in fact, we can make this seed depend on an alternative variable of the same observation, thus, were 2 passengers to come, who paid exactly the same Fare, they would get exactly the same probability of survival (when Age is missing). See below:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "23"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# the seed is now the Fare\n",
    "int(observation.Fare)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Survived</th>\n",
       "      <th>Age</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Age_random</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>888</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>23.45</td>\n",
       "      <td>35.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     Survived  Age   Fare  Age_random\n",
       "888         0  NaN  23.45        35.0"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# we assign the Fare as the seed in the random sample extraction\n",
    "obs_sample = X_train.Age.dropna().sample(1, random_state=int(observation.Fare))\n",
    "obs_sample.index = [888]\n",
    "observation['Age_random']=obs_sample\n",
    "observation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Survived</th>\n",
       "      <th>Age</th>\n",
       "      <th>Fare</th>\n",
       "      <th>Age_random</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8.4583</td>\n",
       "      <td>25.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Survived  Age    Fare  Age_random\n",
       "5         0  NaN  8.4583        25.0"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# for a different observation with a different Fare, we would get a different randomly extracted value\n",
    "observation = data[data.Age.isnull()].head(1)\n",
    "obs_sample = X_train.Age.dropna().sample(1, random_state=int(observation.Fare))\n",
    "obs_sample.index = [5]\n",
    "observation['Age_random']=obs_sample\n",
    "observation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This is a way of controlling the randomness. Using the Fare to set the random state, you guarantee that for 2 passengers with equal Fare, the Age will be replaced with the same number, and therefore the 2 passengers will get the same probability of survival.\n",
    "\n",
    "In real life datasets, you will build models that use tens of variables or more. So in cases like those, you can think of picking the 3-5 more important variables, those that have the strongest impact on the output of the machine learning model, and combine them to create the random state. Therefore, customers that share the 3-5 main variable values, will get the same scores.\n",
    "\n",
    "**That is all for this demonstration. I hope you enjoyed the notebook, and see you in the next one.**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  },
  "toc": {
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": "block",
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
